# required to enable HTTP protocol debugging
# override ruby http library to use noisy requests e.g. dump all headers for each request
module Net   #:nodoc:
  class HTTPGenericRequest
    def write_header(sock, ver, path)
      buf = "#{@method} #{path} HTTP/#{ver}\r\n"
      each_capitalized do |k,v|
        buf << "#{k}: #{v}\r\n"
      end
      buf << "\r\n"
      $logger.debug buf # injected logging
      sock.write buf
    end
  end
end
